<script type="text/javascript" >
    jQuery(document).ready(function() {
        jQuery(".galleryVideo a[rel^='prettyPhoto']").prettyPhoto({
            theme:'facebook',
            keyboard_shortcuts: false
        });
        stYoutubeToolbox.shortAction();
        stYoutubeToolbox.pagingCallbackFunction = function(data){
            data['filter'] = jQuery('#stFilter').val();
        };
    });
</script>
<div class="w100p bgl">
    <div class="w100p bgr">
        <div class="inner_container">
            <div class="filter">
                <label><?php _e('Filter', $config['plugin_name']) ?>:</label>
                <select id="stFilter" onchange="stYoutubeToolboxCustom.filter(this, '<?php echo $current_action?>')">
                    <option <?php echo $filter == 'all' ? 'selected' : '' ?> value="all">All</option>
                    <?php
                    foreach ($videos as $value) {
                        if ($filter == $value->video_id) {
                            $select = 'selected';
                        } else {
                            $select = '';
                        }
                    ?>
                        <option <?php echo $select ?> value="<?php echo $value->video_id ?>"><?php echo $value->video_title ?></option>
                    <?php
                    }
                    ?>
                </select>
            </div>
            <br /><br />
            <table class="widefat galleryVideo" cellspacing="0">
                <thead>
                    <tr>
                        <?php print_column_headers('stYoutubeToolbox_comment'); ?>
                    </tr>
                </thead>
                <tbody>
                    <?php
                        if (count($results) > 0) {
                            $tr_class = "";
                            foreach ($results as $result) {
                                if( empty($tr_class) || $tr_class == "class='bg_gray2'"){
                                    $tr_class = "class='bg_gray1'";
                                }else{
                                    $tr_class = "class='bg_gray2'";
                                }
                                echo "<tr id='$result->id' $tr_class>"
                                . "<td >"
                                . "<a href=\"http://www.youtube.com/watch?v={$result->video_id}\" rel=\"prettyPhoto\">"
                                . "<img height='40' src='" . $result->thumbnail_url . "' alt='' />"
                                . "</a>"
                                . "</td>"
                                . "<td>" . $result->author . "</td>"
                                . "<td>" . $result->title . "</td>"
                                . "<td>" . $result->content . "</td>"
                                . "</tr>"
                                ;
                            }
                        }
                    ?>
                    </tbody>
                </table>
                <div class="page_d">
                <?php echo $pagination ?>
                <div class="cl"></div>
            </div>

        </div>
    </div>
</div>